home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-01-08 | 1.7 KB | 51 lines | [TEXT/CWIE] |
- // HuePopupMenu.h
- // written by Constantine Spathis.
- // No rights reserved, use and abuse at will!
- // Thanks to the guys at Metrowerks who saved the Macintosh ( IMO :-) ) and to Greg Dow
- // for creating such a cranking piece of software. And of course to Ron Liechty
- // (hope I spelled that one correct) who must really be 10 guys from the way he
- // keeps ontop of answering questions.
- //
- //
- // This class facilitates the creation of true(?) dynamic Pop-up menus within the
- // powerplant framework. The implementation is fairly straightforward, kill the control
- // powerplant creates and create our own with the menuID s_numMenu (making sure to
- // increment it). Please let me know of any improvements you make and any bugs you might
- // find.
- //
- // 1/8/95 CS
- // Initial Iteration
-
- // PowerPlant Headers
- #include <LStdControl.h>
-
- class LDynamicPopupMenu
- : public LStdPopupMenu
- {
- public:
- // Class ID Enumeration see Scott Meyers, Effective C++.
- enum { class_id = 'LDPM' };
-
- // Stream Oriented Constructor
- LDynamicPopupMenu(LStream* in_pStream);
-
- // Destructor
- virtual ~LDynamicPopupMenu();
-
- // Creator Function
- static LDynamicPopupMenu* CreateLDynamicPopupMenuStream(LStream* in_pStream);
-
- // Useful member functions
- // You'll probably want to re-define BroadcastValueMessage to do whatever
- // is appropriate in your application.
- virtual void BroadcastValueMessage();
-
- // Add a menu Item. Note: the input string is a C-String
- void AddCMenuItem(const char* in_csStr);
- // Add a menu Item. Note: the input string is a P-String
- void AddPMenuItem(const StringPtr in_cpStr);
- // Call this menu when your done adding things to it
- void FinishedCreatingMenu(Int32 in_initialItem);
-
- };
-